<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Dissasemble: src/consoleParser/consoleParser.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="Hopper_v3.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Dissasemble
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">This project receives as input a file.o and displays the assembly code for that object.</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('console_parser_8c.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">src/consoleParser/consoleParser.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="console_parser_8h_source.html">consoleParser.h</a>&quot;</code><br/>
<code>#include &lt;<a class="el" href="debug_8h_source.html">debug.h</a>&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for consoleParser.c:</div>
<div class="dyncontent">
<div class="center"><img src="console_parser_8c__incl.png" border="0" usemap="#src_2console_parser_2console_parser_8c" alt=""/></div>
<map name="src_2console_parser_2console_parser_8c" id="src_2console_parser_2console_parser_8c">
<area shape="rect" id="node3" href="console_parser_8h.html" title="consoleParser.h" alt="" coords="52,83,167,112"/><area shape="rect" id="node11" href="debug_8h.html" title="debug.h" alt="" coords="191,83,257,112"/><area shape="rect" id="node9" href="config_8h.html" title="config.h" alt="" coords="179,160,245,189"/></map>
</div>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structts_console_input.html">tsConsoleInput</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure containing the different program process.  <a href="structts_console_input.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="console_parser_8c.html#a0d20b69b0ad703df78459e1033d5c1d4">printHelp</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints menu options.  <a href="#a0d20b69b0ad703df78459e1033d5c1d4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="console_parser_8c.html#a2af213d1b5ca1316704f2b32db8d64f0">validateInput</a> (char *<a class="el" href="my_obj_dump_8c.html#a5c3fa38e0155bca67444f039c853b1d9">pArg</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Validates the input arguments, to verify whether they correspond to a valid program option.  <a href="#a2af213d1b5ca1316704f2b32db8d64f0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="console_parser_8c.html#a2c436ca08ce820e61b3a24b28dde186b">processArgs</a> (int argc, char *argv[], char **<a class="el" href="my_obj_dump_8c.html#a7f186279bc9936c0594397a0f8bb1958">pArgFiles</a>, char *<a class="el" href="my_obj_dump_8c.html#a5c3fa38e0155bca67444f039c853b1d9">pArg</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A process that divides the entry list into commands and arguments to be used in the program execution.  <a href="#a2c436ca08ce820e61b3a24b28dde186b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="console_parser_8c.html#a9fc4b40085a2aff0587edf4b1a81213c">parseConsoleInput</a> (int argc, char *argv[], char **<a class="el" href="my_obj_dump_8c.html#a7f186279bc9936c0594397a0f8bb1958">pArgFiles</a>, char *<a class="el" href="my_obj_dump_8c.html#a5c3fa38e0155bca67444f039c853b1d9">pArg</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse the arguments entered as input to identify the file name and the commands to be executed. Validating ever input command.  <a href="#a9fc4b40085a2aff0587edf4b1a81213c"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="console_parser_8c.html#aff2a933e4b49f84d7e94cac676c2e251">inputCommandArgs</a> [<a class="el" href="config_8h.html#a0a5eeb8992ca2e8923f04e200bfbb3fa">MAX_INPUT_ARGS</a>]</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array containing incoming commands.  <a href="#aff2a933e4b49f84d7e94cac676c2e251"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="console_parser_8c.html#a1be7c2e9566c13d60a13ca87b20c4554">inputArgList</a> [<a class="el" href="config_8h.html#a0a5eeb8992ca2e8923f04e200bfbb3fa">MAX_INPUT_ARGS</a>]</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array containing the list of arguments for the application execution.  <a href="#a1be7c2e9566c13d60a13ca87b20c4554"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="console_parser_8c.html#a408fc63eb7b2e81325968841bd263a3e">numberInputCommands</a> = 0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of input commands.  <a href="#a408fc63eb7b2e81325968841bd263a3e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="console_parser_8c.html#a0b353a95f61bfb1fc19a3207638a8161">numberInputArgs</a> = 0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of input arguments.  <a href="#a0b353a95f61bfb1fc19a3207638a8161"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structts_console_input.html">tsConsoleInput</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="console_parser_8c.html#a11d16faa773e5354bb38c4b394990d1d">inputCommands</a> []</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array containing the input commands.  <a href="#a11d16faa773e5354bb38c4b394990d1d"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a9fc4b40085a2aff0587edf4b1a81213c"></a><!-- doxytag: member="consoleParser.c::parseConsoleInput" ref="a9fc4b40085a2aff0587edf4b1a81213c" args="(int argc, char *argv[], char **pArgFiles, char *pArg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="console_parser_8h.html#ac36f640b6a9f8c739154fd66968b7397">parseConsoleInput</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>argv</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>pArgFiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>pArg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse the arguments entered as input to identify the file name and the commands to be executed. Validating ever input command. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>Number of arguments. </td></tr>
    <tr><td class="paramname">arg[]</td><td>Array of arguments. </td></tr>
    <tr><td class="paramname">pArgFiles</td><td>Name File argument </td></tr>
    <tr><td class="paramname">pArg</td><td>Commands </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0d20b69b0ad703df78459e1033d5c1d4"></a><!-- doxytag: member="consoleParser.c::printHelp" ref="a0d20b69b0ad703df78459e1033d5c1d4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="console_parser_8c.html#a0d20b69b0ad703df78459e1033d5c1d4">printHelp</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Prints menu options. </p>

</div>
</div>
<a class="anchor" id="a2c436ca08ce820e61b3a24b28dde186b"></a><!-- doxytag: member="consoleParser.c::processArgs" ref="a2c436ca08ce820e61b3a24b28dde186b" args="(int argc, char *argv[], char **pArgFiles, char *pArg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="console_parser_8c.html#a2c436ca08ce820e61b3a24b28dde186b">processArgs</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>argv</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>pArgFiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>pArg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A process that divides the entry list into commands and arguments to be used in the program execution. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>Number of arguments. </td></tr>
    <tr><td class="paramname">arg[]</td><td>Incoming argument array </td></tr>
    <tr><td class="paramname">pArgFiles</td><td>Name File argument </td></tr>
    <tr><td class="paramname">pArg</td><td>Input commands </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2af213d1b5ca1316704f2b32db8d64f0"></a><!-- doxytag: member="consoleParser.c::validateInput" ref="a2af213d1b5ca1316704f2b32db8d64f0" args="(char *pArg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char char <a class="el" href="console_parser_8c.html#a2af213d1b5ca1316704f2b32db8d64f0">validateInput</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>pArg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Validates the input arguments, to verify whether they correspond to a valid program option. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pArg</td><td>Argument to validate. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a1be7c2e9566c13d60a13ca87b20c4554"></a><!-- doxytag: member="consoleParser.c::inputArgList" ref="a1be7c2e9566c13d60a13ca87b20c4554" args="[MAX_INPUT_ARGS]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char <a class="el" href="console_parser_8c.html#a1be7c2e9566c13d60a13ca87b20c4554">inputArgList</a>[<a class="el" href="config_8h.html#a0a5eeb8992ca2e8923f04e200bfbb3fa">MAX_INPUT_ARGS</a>]</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Array containing the list of arguments for the application execution. </p>

</div>
</div>
<a class="anchor" id="aff2a933e4b49f84d7e94cac676c2e251"></a><!-- doxytag: member="consoleParser.c::inputCommandArgs" ref="aff2a933e4b49f84d7e94cac676c2e251" args="[MAX_INPUT_ARGS]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char <a class="el" href="console_parser_8c.html#aff2a933e4b49f84d7e94cac676c2e251">inputCommandArgs</a>[<a class="el" href="config_8h.html#a0a5eeb8992ca2e8923f04e200bfbb3fa">MAX_INPUT_ARGS</a>]</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Array containing incoming commands. </p>

</div>
</div>
<a class="anchor" id="a11d16faa773e5354bb38c4b394990d1d"></a><!-- doxytag: member="consoleParser.c::inputCommands" ref="a11d16faa773e5354bb38c4b394990d1d" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structts_console_input.html">tsConsoleInput</a> <a class="el" href="console_parser_8c.html#a11d16faa773e5354bb38c4b394990d1d">inputCommands</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment">
{
{ <a class="code" href="config_8h.html#a938a4cfd60b05c57c65ce0654786a6db" title="Option that identifies the command that displays the parsed file headers.">HEADER_DUMP</a>, <span class="stringliteral">&quot;Prints the headers name of the file\n&quot;</span>, 0 },
{ <a class="code" href="config_8h.html#a5fd781addac9641808bc182bb9e01120" title="Option that identifies the command that displays the parsed file in hex format.">RAW_DUMP</a>, <span class="stringliteral">&quot;Hex dump of the file\n&quot;</span>, 0 },
{ <a class="code" href="config_8h.html#a5461ede715c267ed77c50b8fd70867ed" title="Option that identifies the command that executes disassemble of the file.">PROCESS_HEADER_CONTENT</a>, <span class="stringliteral">&quot;Prints the content of each header\n&quot;</span>, 0 },
{ 0, 0, 0 } }
</pre></div>
<p>Array containing the input commands. </p>

</div>
</div>
<a class="anchor" id="a0b353a95f61bfb1fc19a3207638a8161"></a><!-- doxytag: member="consoleParser.c::numberInputArgs" ref="a0b353a95f61bfb1fc19a3207638a8161" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char <a class="el" href="console_parser_8c.html#a0b353a95f61bfb1fc19a3207638a8161">numberInputArgs</a> = 0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Number of input arguments. </p>

</div>
</div>
<a class="anchor" id="a408fc63eb7b2e81325968841bd263a3e"></a><!-- doxytag: member="consoleParser.c::numberInputCommands" ref="a408fc63eb7b2e81325968841bd263a3e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char <a class="el" href="console_parser_8c.html#a408fc63eb7b2e81325968841bd263a3e">numberInputCommands</a> = 0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Number of input commands. </p>

</div>
</div>
</div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="console_parser_8c.html">consoleParser.c</a>      </li>

    <li class="footer">Generated on Thu Oct 11 2012 12:32:08 for Dissasemble by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
